package com.qzsoft.zhjd.server.modules.ludong.weigh.entity;

import com.qzsoft.zhjd.server.modules.ludong.weigh.annotation.ConvertData;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ToString
@TableName("n_materiel_platfom_data")
public class PlatformDataSendEntity {


    @ConvertData(filed = "weightCode")
    private String WstID;//流水号

    @ConvertData(filed = "weighbridgeId")
    private String SiteNO;//磅房编号

    @ConvertData(filed = "operatorId")
    private String OperatorID;//操作员ID

    private String OperatorName;//操作员名称

    @ConvertData(filed = "weightDataType")
    private String WstType;//流水类型

    @ConvertData(filed = "carNumber")
    private String VLP;//车牌号

    BigDecimal InWeight;//进场重量t

    BigDecimal OutWeight;//出场重量t

    @ConvertData(filed = "grossWeight")
    BigDecimal GrossWeight;//毛重t

    @ConvertData(filed = "tareWeight")
    BigDecimal TareWeight;//皮重t

    @ConvertData(filed = "netWeight")
    BigDecimal SuttleWeight;//净重t

    @ConvertData(filed = "weightType")
    private String RSType;//收发料类型

    @ConvertData(filed = "cooperateUnitId")
    private String ProviderID;//客商id

    private String ProviderName;//客商名称

    @ConvertData(filed = "projectId")
    private String ProjectID;//项目id

    private String MatCategory;//材料类别
    private String MaterailName;//材料名称

    @ConvertData(filed = "materielTypeId")
    private String MaterailCode;//材料id

    private String MaterailSpec;//材料规格

    @ConvertData(filed = "usage")
    private String UsePlace;//使用位置

    @ConvertData(filed = "company")
    private String CalcUnit;//计算单位

    @ConvertData(filed = "oldWeightCode")
    private String RawBillNO;//原始单据编号

    @ConvertData(filed = "waybillQuantity")
    BigDecimal RawBillNum;//运单数量

    BigDecimal ConvRate;//换算系数

    @ConvertData(filed = "waybillWeight")
    BigDecimal RawBillWeight;//运单重量t

    @ConvertData(filed = "deductionRatio")
    BigDecimal DeductRate;//扣量

    @ConvertData(filed = "deductionWeight")
    BigDecimal DeductWeight;//扣量吨

    @ConvertData(filed = "weight")
    BigDecimal RealWeight;//扣完后实际重量t

    @ConvertData(filed = "quantity")
    BigDecimal RealNum;//扣完后实际数量

    BigDecimal PlusRate;//正差%
    BigDecimal MinusRate;//负差%
    Integer AutoDeduct;//自动回皮：0否、1是
    BigDecimal RealOffset;//实际偏差

    @ConvertData(filed = "deviationType")
    Integer OffsetResult;//偏差结果：0正常、1超正差、2超负差

    @ConvertData(filed = "entryTime")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime InTime;//入场时间yyyy-MM-dd hh:mm:ss

    @ConvertData(filed = "exitTime")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime OutTime;//出场时间yyyy-MM-dd hh:mm:ss

    Integer Status;//状态:0未出场、1已出场、2未打印
    Integer PrintCnt;//打印次数
    Integer Disposed;//是否已作废：0否、1是
    //extend
    @ConvertData(filed = "entryImageOne")
    private String VehHeadPicPath1;//进场车头图片名
    @ConvertData(filed = "entryImageTwo")
    private String VehTailPicPath1;//进场车尾图片名
    @ConvertData(filed = "entryImageThree")
    private String VehTopPicPath1;//进场车顶图片名
    @ConvertData(filed = "entryImageFour")
    private String WaagPicPath1;//进场磅房图片名
    @ConvertData(filed = "exitImageOne")
    private String VehHeadPicPath2;//出场车头图片名
    @ConvertData(filed = "exitImageTwo")
    private String VehTailPicPath2;//出场车尾图片名
    @ConvertData(filed = "exitImageThree")
    private String VehTopPicPath2;//出场车顶图片名
    @ConvertData(filed = "exitImageFour")
    private String WaagPicPath2;//出场磅房图片名
    @ConvertData(filed = "waybillImage")
    private String BillScanPicPath;//运单扫描图片名

    @ConvertData(filed = "deptId")
    private String deptId;
    @ConvertData(filed = "deptPkid")
    private String deptPkid;
}
